<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    .box {
      position: relative;
      width: 1226px;
      height: 600px;
      margin: 0 auto;
      background: url(./10案例.jpg);
    }

    .mask {
      position: absolute;
      left: 0;
      bottom: 0;
      /* 绝对定位的元素会脱离标准流，脱标之后的元素宽高此时由内容撑开 */
      width: 100%;
      height: 150px;
      background-color: rgba(0, 0, 0, .6);
    }
  </style>
</head>
<body>
  <div class="box">
    <div class="mask"></div>
  </div>
</body>
</html>